package com.avic.map.common.model.enums;

import java.util.HashMap;
import java.util.Map;

public enum MapDataStatusEnums {

    INVALID(0, "失效", "失效"),

    FIRE(1, "火灾", "火灾"),

//    SOLDIER_ONLINE(2, "单兵在线"),
//
//    SOLDIER_OFFLINE(3, "单兵离线"),

    NON_UNIT_SOLDIER(4, "非本单位单兵", "非本单位单兵"),

    INIT_SOLDIER(5, "预设单兵", "预设单兵"),

    WALKIE_TALKIE_SOLDIER_ONLINE(6, "手持对讲机单兵在线", "在线"),

    WALKIE_TALKIE_SOLDIER_OFFLINE(7, "手持对讲机单兵离线", "手持对讲机单兵离线"),

    G_TALKIE_SOLDIER_ONLINE(8, "4g单兵在线", "在线"),

    G_TALKIE_SOLDIER_OFFLINE(9, "4g单兵离线", "4g单兵离线"),

    WALKIE_TALKIE_SOLDIER_ONLINE_EMERGENCY(10, "手持对讲机单兵参与应急在线", "应急在线"),

    WALKIE_TALKIE_SOLDIER_OFFLINE_EMERGENCY(11, "手持对讲机单兵参与应急离线", "手持对讲机单兵参与应急离线"),

    G_SOLDIER_ONLINE_EMERGENCY(12, "4g兵参与应急在线", "应急在线"),

    G_SOLDIER_OFFLINE_EMERGENCY(13, "4g单兵参与应急离线", "4g单兵参与应急离线"),

    CAR_ONLINE(14, "车辆在线", "在线"),

    CAR_OFFLINE(15, "车辆离线", "车辆离线"),

    CAR_ONLINE_EMERGENCY(16, "车辆参与应急在线", "应急在线"),

    CAR_OFFLINE_EMERGENCY(17, "车辆参与应急离线", "车辆参与应急离线"),

    NON_UNIT_CAR(18, "非本单位车辆", "非本单位车辆"),

    INIT_CAR(19, "预设车辆", "预设车辆"),

    INTI_UAV(20, "预设无人机", "预设无人机"),

    VIDO(21, "本船", "本船"),

    VIDM(22, "非本船", "非本船");

    MapDataStatusEnums(Integer type, String describe, String mapStateValue) {
        this.type = type;
        this.describe = describe;
        this.mapStateValue = mapStateValue;
    }

    private Integer type;

    private String describe;

    private String mapStateValue;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getMapStateValue() {
        return mapStateValue;
    }

    public void setMapStateValue(String mapStateValue) {
        this.mapStateValue = mapStateValue;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public static final Map<Integer, MapDataStatusEnums> MAP_DATA_STATUS_ENUMS_MAP = new HashMap<>();

    public static MapDataStatusEnums getMapDataStatusEnumsByType(int type) {
        if (null == MAP_DATA_STATUS_ENUMS_MAP || MAP_DATA_STATUS_ENUMS_MAP.size() <= 0) {
            for (MapDataStatusEnums mapTaggingEnums : MapDataStatusEnums.values()) {
                MAP_DATA_STATUS_ENUMS_MAP.put(mapTaggingEnums.getType(), mapTaggingEnums);
            }
        }
        return MAP_DATA_STATUS_ENUMS_MAP.get(type);
    }
}
